<?php
namespace Api;
use \think\Db;
use \SB\extension\Controller;
// use \Service;

class indexController extends Controller{
	function index(){
		actLog("测试","测试成功");
	}

	function getIndex(){
		$data['articleCount'] = M("article")->count();
		$map[] = array("audit_time","EGT",strtotime(date("Y-m-d"),time()));
		// echo strtotime(date("Y-m-d"),time());
		$data['articleTodayCount'] = M("article")->where($map)->count();
		$data['userCount'] = M("user")->where("status","=","1")->count();
		$data['faildCount'] = M("log")->where("type","eq","login_failed")->count();;
		$this->ajaxReturn($data);
	}
}